<?php
namespace app\admin\controller;
use think\Controller;
class Module extends Controller{
    
    public function modulist(){
        //查看模板
        $module=model("Module");
        $modulist=db("Module")->select();
        
        //进行无限极分类
        $moducates=$module->getModuleByParentId($modulist);
        //dump($moducates);
        $modulists=$module->getModuCates($modulist);
       // dump($modulists);
       // print_r($modulists);exit;
        return $this->fetch("",[
            "moducates"=>$moducates,
            "modulists"=>$modulists,
        ]);
    }
    
    public function moduadd(){
      //模块启用  
        
      return $this->fetch();  
    }
    
    public function modudel(){
    //移除模块 
        
      echo "已删除";   
    }
}

